home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / X11 / spatial / spatial.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-05-03  |  1.2 KB  |  65 lines

  1. /* (C) Copyright 1991 Andrew Plotkin. Permission is
  2. given to copy and use, as long as this copyright
  3.  notice is retained. */
  4.  
  5. #include <stdio.h>
  6. #include <X11/Xlib.h>
  7. #include "spatial.h"
  8. #include "patchlevel.h"
  9.  
  10. #define INITWINSIZEX (720)
  11. #define INITWINSIZEY (740)
  12.  
  13. extern void srandom();
  14.  
  15. extern double focallen;
  16. extern int forcemono;
  17.  
  18. extern void xinit(), loadpieces(), gameloop(),
  19. initintro(), introloop(), get_names(), load_hscores(),
  20. redo_board_globals();
  21. extern int checkmod_scores();
  22.  
  23. main(argc, argv)
  24. int argc;
  25. char *argv[];
  26. {
  27.     int ix;
  28.  
  29.     srandom(getpid());
  30.  
  31.     for (ix=1; ix<argc; ix++) {
  32.     if (strcmp(argv[ix], "-m")) {
  33.         fprintf(stderr, "usage: spatial [ -m ]\n");
  34.         exit(-1);
  35.     }
  36.     else
  37.         forcemono = 1;
  38.     }
  39.  
  40.     loadpieces(PIECEFILENAME);
  41.     fieldx = 5;
  42.     fieldy = 5;
  43.     fieldz = 11;
  44.     fieldoffx = -2.5;
  45.     fieldoffy = -2.5;
  46.     fieldoffz = -4.0-(double)fieldz;
  47.     focallen = 1.0;
  48.     stereo = 0;
  49.     dispx = INITWINSIZEX;
  50.     dispy = INITWINSIZEY;
  51.     redo_board_globals();
  52.     xinit();
  53.     get_names();
  54.     load_hscores(0);
  55.     while (1) {
  56.     initintro();
  57.     introloop();
  58.     initgame();
  59.     gameloop();
  60.     if (checkmod_scores()) {
  61.         load_hscores(1);
  62.     }
  63.     }
  64. }
  65.